<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="./ajax.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript"
	src="./ajax_search.js"></script>
<style type="text/css">
<!--
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
}
-->
</style>
<script>



</script>
</head>

<body>

	<?php 
	require_once("bd_utils.php");
	require_once("tools.php");
	$obj_utils=new bd_utils();
	$obj_utils->connect();
	if( (isset($_POST['nom'])) && (isset($_POST['prenom'])) && (isset($_POST['sexe'])) && (isset($_POST['dossard'])) ){
		$date=$_POST['y'].$_POST['m'].$_POST['d'];
		$club="";
		$distance=$_POST['distance'];
		$obj_utils->saveRunner($_POST['nom'],$_POST['prenom'],$date,$_POST['sexe'],$_POST['dossard'],$club,$distance);
	}


?>

	<h1>Inscriptions</h1>
	<form action="./index.php?page=inscriptions.php" method="post">
		<br> <a href="#" onClick="closeSearch();">close Suggest</a>
		<table class="principale">
			<tr>
				<td class="style1"><strong>Nom:&nbsp;</strong></td>
				<td><input type="text" id="txtSearch" name="nom"
					alt="Search Criteria" onkeyup="searchSuggest();" autocomplete="off"
					onFocus="showsearch();" />

					<div id="search_suggest"></div>
				</td>
			</tr>
			<tr>
				<td class="style1"><strong>Pr&eacute;nom:&nbsp;</strong></td>
				<td><strong> <input name="prenom" type="text" id="prenom">
				</strong></td>
			</tr>
<!-- 			<tr> -->
<!-- 				<td class="style1"><strong>Date de naissance:&nbsp;</strong></td> -->
<!-- 				<td><strong>  -->
				<input name="d" type="hidden" id="d" size="2" value="00" readonly="true"> 
				<input name="m" type="hidden" id="m" size="2" value="00" readonly="true"> 
				<input name="y" type="hidden" id="y" size="10" maxlength="4" value="0000">
<!-- 				</strong></td> -->
<!-- 			</tr> -->
			<tr>
				<td class="style1"><strong>Dossard:&nbsp;</strong></td>
				<td><strong> <input name="dossard" type="text" id="dossard"
						autocomplete="off">
				</strong></td>
			</tr>
			<tr>
				<td class="style1"><strong>Sexe:&nbsp;</strong></td>
				<td><strong> <label> <input type="radio" name="sexe" value="M"
							checked="true" id="man"> M
					</label> <br> <label> <input type="radio" name="sexe" value="F"
							id="woman"> F
					</label> <br>

				</strong></td>
			</tr>
			
			<tr>
				<td class="style1"><strong>Distance:&nbsp;</strong></td>
				<td><strong> <label> <input name="distance" type="radio" id="equipe"
							value="<?php echo $obj_utils->getSmalDistance();?>" checked> <?php echo $obj_utils->getSmalDistance();?>
					</label><br> <label> <input name="distance" type="radio"
							id="equipe" value="<?php echo $obj_utils->getBigDistance();?>"> <?php echo $obj_utils->getBigDistance();?>
					</label>
				</strong></td>
			</tr>


			<tr>
				<td class="style1">&nbsp;</td>
				<td><strong> <input type="submit" name="Submit" value="Submit">
				</strong></td>
			</tr>

		</table>
	</form>
	<form id="frmSearch" action=""></form>
</body>
<?php 	$obj_utils->close();	?>
</html>
